using System;
using System.Collections.Generic;
using System.Text;

namespace CBase
{
    public interface IColor
    {
        void ResetColor(byte red, byte green, byte blue);
        Int32 GetColor();
    }

    public class CColor:IColor
    {
        byte red, green, blue;

        public CColor()
        {
            this.red = this.green = this.blue = 0;
        }

        public CColor(byte red, byte green, byte blue)
        {
            this.red = red;
            this.green = green;
            this.blue = blue;
        }

        public void CleanColor()
        {
            this.red = this.green = this.blue = 0;
        }

        public void ResetColor(byte red, byte green, byte blue)
        {
            this.red = red;
            this.green = green;
            this.blue = blue;
        }

        public Int32 GetColor()
        {
            return (Int32)red << 16 | (Int32)green << 8 | (Int32)blue;
        }
    }

    public class CPoint:CColor
    {
        private int x, y;
        //private byte red, green, blue;

        public CPoint():base()
        {
            this.x = this.y = 0;
            //this.red = this.green = this.blue = 0;
        }

        public CPoint(int x, int y, byte red, byte green, byte blue):base(red, green, blue)
        {
            this.x = x;
            this.y = y;
        }

        public int PointX
        {
            get { return x; }
        }

        public int PointY
        {
            get { return y; }
        }

        public void Reset()
        {
            this.x = this.y = 0;
        }

        public void MoveTo(int x, int y)
        {
            this.x = x;
            this.y = y;
        }

        public void MoveBy(int x, int y)
        {
            this.x += x;
            this.y += y;
        }

        public void HMoveTo(int x)
        {
            this.x = x;
        }

        public void VMoveTo(int y)
        {
            this.y = y;
        }

        public void HMoveBy(int x)
        {
            this.x += x;
        }

        public void VMoveBy(int y)
        {
            this.y += y;
        }

        //public void LColor
    }

    public class CLine:CPoint, IColor
    {

    }
}
